// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import axios from 'axios'
import Vuelazy from 'vue-lazyload'
Vue.prototype.axios = axios;
//路由
import Router from "vue-router"
import First from './components/First'
import Market from './components/Market'
import World from './components/World'
import Car from './components/Car'
import Mine from './components/Mine'
//引入axios
// import Box from "./components/Box"
Vue.use(Router)

var routes = [

	{path:"",component:First},
	{path:"/first",component:First},
	{path:"/market",component:Market},
	{path:"/world",component:World},
	{path:"/car",component:Car},
	{path:"/mine",component:Mine}
]
var router = new Router({
	routes:routes
})

Vue.config.productionTip = false

/* eslint-disable no-new */
//img懒加载
Vue.use(Vuelazy,{
	loading:'*.png'
})
//实现rem布局
var body_width = document.body.clientWidth;
	var html = document.getElementById("html");
	html.style.fontSize = body_width*100/414+"px";
window.onresize = function(){
	var body_width = document.body.clientWidth;
	var html = document.getElementById("html");
	html.style.fontSize = body_width*100/414+"px";
}



new Vue({
  el: '#app',
  template: '<App/>',
  components: { App },
  router:router
})
